//
//  PhotoCell.m
//  textHengPing
//
//  Created by bosma on 14-3-12.
//  Copyright (c) 2014年 cn.com.bosma. All rights reserved.
//

#import "PhotoCell.h"

@implementation PhotoCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
            // 初始化时加载collectionCell.xib文件
            NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"PhotoCell" owner:self options: nil];
        
            // 如果路径不存在，return nil
            if(arrayOfViews.count < 1){
                return nil;
            }
        
            // 如果xib中view不属于UICollectionViewCell类，return nil
            if(![[arrayOfViews objectAtIndex:0] isKindOfClass:[UICollectionViewCell class]]){
                return nil;
            }
        
            // 加载nib
            self = [arrayOfViews objectAtIndex:0];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
